package wang.aweb.childcar.task;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Configuration
@EnableScheduling
public class ComputeTask {
    Logger logger= LoggerFactory.getLogger(ComputeTask.class);
    @Scheduled(cron = "0 * * * * ?")
    public void prit(){
        logger.info("执行了一次定时任务");
    }
}
